package com.coder.baseapp.injecter.module;

import android.app.Activity;
import android.app.Fragment;

import com.coder.baseapp.injecter.scope.PerActivity;

import dagger.Module;
import dagger.Provides;

/**
 * @Author: Tua.CoderGui
 * *
 * @Date: 2017/3/13
 * *
 * Copyright (c) 2017 All Rights Reserved.
 */
@Module
public class FragmentModule {

    private Fragment mFragment;

    public FragmentModule(Fragment mFragment) {
        this.mFragment = mFragment;
    }

    /**
     * 提供Activity
     *
     * @return
     */
    @Provides
    @PerActivity
    public Activity providesActivity() {
        return mFragment.getActivity();
    }
}
